﻿@{
    ViewBag.Title = "stDrupInfoIndex";
    Layout = "~/Views/Shared/_ViewMenu.cshtml";
}
@using ZX.HIS.Model;
@using ZX.HIS.Common;
@{
    PageClass<ZX.HIS.Model.DrupInfo> page = Model as PageClass<ZX.HIS.Model.DrupInfo>;
    List<ZX.HIS.Model.DrugTypeInfo> DrugTypeList = ViewData["liat"] as List<ZX.HIS.Model.DrugTypeInfo>;
}
<div id="urHere">DouPHP 管理中心<b>&gt;</b><strong>药品类型名</strong> </div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h3><a href="/DrupInfo/stDrupInfoAdd" class="actionBtn add">新增药品信息</a>药品信息管理</h3>
    <div>
        <div class="filter">
            <form action="/DrupInfo/stDrupInfoIndex" method="post">
                药品分类：
                <select id="lei" name="lei">
                    <option value="">全部</option>
                    @foreach (var item in DrugTypeList)
                    {
                        <option value="@item.DrugTypeName">@item.DrugTypeName</option>
                    }
                </select>
                药品检索:
                <input list="browsers" class="inpMain" placeholder="名称" id="namee" name="namee">
                <datalist id="browsers">
                    @foreach (var item in page.PageList)
                    {
                        <option value="@item.DrugName">@item.DrugName</option>
                    }
                </datalist>
                状态：
                <select id="zhuan" name="zhuan">
                    <option value="0">全部</option>
                    <option value="1">启用</option>
                    <option value="2">禁用</option>
                </select>

                <input type="submit" class="btnGray" value="查询" />
            </form>
        </div>


        <table width="100%" class="table table-bordered  tableBasic">
            <tr>
                <!--<th class="table-title"><i class="select-icon J_select J_selectAll"></i>全选</th>-->
                <th class="table-title">药品名称</th>
                <th class="table-title">药品分类</th>
                <th class="table-title">规格</th>
                <th class="table-title">生产厂家</th>
                <th class="table-title">处方价</th>
                <th class="table-title">总库存</th>
                <th class="table-title">库存阈值</th>
                <th class="table-title">操作</th>
            </tr>
            <tbody class="main-table-tbody J_drugList">
                @foreach (var item in page.PageList)
                {
                    <tr>
                        <!--<th class="table-title"><i class="select-icon J_select J_selectAll"></i>全选</th>-->
                        <td class="table-title">@item.DrugName</td>
                        <td class="table-title">@item.DrugTypeId</td>
                        <td class="table-title">@item.ProductName</td>
                        <td class="table-title">@item.DrugPackSpece</td>
                        <td class="table-title">@item.DrugInvPresPrice</td>
                        <td class="table-title">@item.DrugWareNumber</td>
                        <td class="table-title">@item.DrugInvThrVal</td>
                        <td class="table-title"><a href="/DrupInfo/stDrupInfoUpt/@item.DrugId">修改</a></td>
                    </tr>
                }
            </tbody>
        </table>
        <div class="pager">
            总 页 数：共<span>@page.PageCount</span> 页  |
            当 前 索 引：第<span>@page.PageIndex</span> 页   | <a href="/DrupInfo/PageIndex/@(1)">首页</a>
            @if (page.PageIndex <= 1)
            {
                <a>上一页</a>
            }
            else
            {
                <a href="/DrupInfo/PageIndex/@(page.PageIndex - 1)">上一页</a>
            }
            @if (page.PageIndex >= page.PageCount)
            {
                <a>下一页</a>
            }
            else
            {
                <a href="/DrupInfo/PageIndex/@(page.PageIndex + 1)">下一页</a>
            }
            <a href="/DrupInfo/PageIndex/@(page.PageCount)">尾页</a>
        </div>

        @*<table>
                <tr>
                    <td colspan="7" class="footable-visible">
                        <nav>
                            <ul class="pagination">
                                <li>
                                    <a href="/DrupInfo/stDrupInfoIndex" aria-label="Previous">
                                        <span aria-hidden="true">首页</span>
                                    </a>
                                </li>
                                @if (page.PageIndex == 1)
                                {
                                    <li class="disabled"><a href="/DrupInfo/PageIndex/1">上一页</a></li>
                                }
                                else
                                {
                                    <li><a href="/DrupInfo/PageIndex/@(page.PageIndex - 1)">上一页</a></li>
                                }
                                @if (page.PageIndex == page.PageCount)
                                {
                                    <li class="disabled"><a href="/DrupInfo/PageIndex/@page.PageCount">下一页</a></li>
                                }
                                else
                                {
                                    <li><a href="/DrupInfo/PageIndex/@(page.PageIndex + 1)">下一页</a></li>
                                }
                                <li><a href="/DrupInfo/PageIndex/@page.PageCount">尾页</a></li>
                                <li>
                                    <a href="#" aria-label="Next">
                                        <span aria-hidden="true">共 @page.PageNum 条，每页 @page.PageSize 条，共 @page.PageCount 页，第 @page.PageIndex 页</span>
                                    </a>
                                </li>
                            </ul>
                        </nav>
                    </td>
                </tr>
            </table>*@

    </div>
</div>